package mvc.command.character
{
	import com.adobe.cairngorm.commands.ICommand;
	import com.adobe.cairngorm.control.CairngormEvent;

	import mx.events.IndexChangedEvent;

	public class CharactersRefreshedCmd extends CharacterCmd implements ICommand
	{
		public function execute(event:CairngormEvent):void
		{
			// 自动弹出创建Character，当TblCharacterVO没有数据
			if(super._dsnCharacters.tabCharacters.numChildren == 1)
			{
				super._dsnCharacters.tabCharacters.selectedIndex = 0;
				var icEvent:IndexChangedEvent = new IndexChangedEvent(
					IndexChangedEvent.CHANGE, false, false, null,
					-1, 0);
				super._dsnCharacters.tabCharacters.dispatchEvent(icEvent);
			}
		}
	}
}